/*                                                                                                   
 _____      _           _            ______             
|  __ \    (_)         | |           | ___ \            
| |  \/_ __ _ _ __   __| | ___ _ __  | |_/ / ___  _   _ 
| | __| '__| | '_ \ / _` |/ _ \ '__| | ___ \/ _ \| | | |
| |_\ \ |  | | | | | (_| |  __/ |    | |_/ / (_) | |_| |
 \____/_|  |_|_| |_|\__,_|\___|_|    \____/ \___/ \__, |
                                                   __/ |
                                                  |___/ 

FILENAME        : CpuCore.hpp
CREATED         : 2011-05-15
DESCRIPTION     : LR35902 Cpu core definitions

*/

#ifndef __GUID_FA303BCA_B4D9_4B1C_8657_CA611AB73037__
#define __GUID_FA303BCA_B4D9_4B1C_8657_CA611AB73037__

#include "../../../Types.hpp"
#include "../../../IDevice.hpp"
#include "./Flags.hpp"
#include "./InterruptMask.hpp"

namespace GrinderBoy
{
    namespace Kernel
    {
        namespace CPU
        {
            namespace Sharp
            {
                namespace LR35902
                {
                    ///<documentation language="en-US">
                    ///<sumary>
                    ///Implemnetation of Sharp LR35902 processor emulator.
                    ///</sumary>
                    ///</documentation>
                    class CpuCore : public GrinderBoy::Kernel::IDevice
                    {
                        private:
                            ///<documentation language="en-US">
                            ///<sumary>
                            ///Container for device name.
                            ///</sumary>
                            ///</documentation>
                            static std::wstring* _name;
                        protected:
                            ///<documentation language="en-US">
                            ///<sumary>
                            ///Container for internal registers area.
                            ///</sumary>
                            ///</documentation>
                            GrinderBoy::Kernel::Int8 _registers;
                        public:
                            ///<documentation language="en-US">
                            ///<sumary>
                            ///Creates new instance of cpu core.
                            ///</sumary>
                            ///</documentation>
                            CpuCore();
                            ///<documentation language="en-US">
                            ///<sumary>
                            ///Destroys the instance.
                            ///</sumary>
                            ///</documentation>
                            virtual ~CpuCore();
                            ///<documentation language="en-US">
                            ///<sumary>
                            ///Gets the device name.
                            ///</sumary>
                            ///<return>Returns the device name.</return>
                            ///</documentation>
                            virtual std::wstring& Name();
                            ///<documentation language="en-US">
                            ///<sumary>
                            ///Gets the device type.
                            ///</sumary>
                            ///<return>Returns the device type.</return>
                            ///</documentation>
                            virtual GrinderBoy::Kernel::DeviceType DeviceType();
                    };
                }
            }
        }
    }
}

#endif // __GUID_FA303BCA_B4D9_4B1C_8657_CA611AB73037__